import java.util.Arrays;
import java.util.Scanner;
class Rectangle {
	private int width;
	private int length;
public Rectangle(int width,int length){
		this.width=width;
		this.length=length;
	}
	public int getRecPerimeter(){
		return 2*(width+length);
	}
	public int getRecArea(){
		return width*length;
	}
	public String toString() {
		return "Rectangle [width=" + width + ", length=" + length + "]";
	}
}

class Circle {
	private int radius;
	
	public Circle(int radius){
		this.radius=radius;
	}
	public int getCirPerimeter(){
		return (int) (2*(Math.PI)*radius);
	}
	public int getCirArea(){
		return (int) ((Math.PI)*radius*radius);
	}
	@Override
	public String toString() {
		return "Circle [radius=" + radius + "]";
	}
}
public class Main {

	public static void main(String[] args) {
		Scanner input=new Scanner(System.in);int r1=0,r2=0,s1=0,s2=0;
		Rectangle[] rectangle=new Rectangle[2];
		Circle[] circle=new Circle[2];
		
		for(int i=0;i<2;i++){
			rectangle[i]=new Rectangle(input.nextInt(),input.nextInt());
			r1=r1+rectangle[i].getRecPerimeter();
			s1=s1+rectangle[i].getRecArea();
	
		}
		for(int i=0;i<2;i++){
			circle[i]=new Circle(input.nextInt());
			r2=r2+circle[i].getCirPerimeter();
			s2=s2+circle[i].getCirArea();
		}
		System.out.println(r1+r2);
		System.out.println(s1+s2);
		System.out.println(Arrays.deepToString(rectangle));
		System.out.println(Arrays.deepToString(circle));

	}

}
